#!/usr/bin/env python

'''
reads the raw data, and output the raw data into three files each having data for one field we need
'''

if __name__ == "__main__":
    humidity_file = open("raw_humidity.txt", "w")
    temp2C_file = open("raw_temp2C.txt", "w")
    pressure_file = open("raw_presure.txt", "w")
    for l in open("ww.txt"):
        l = l[:-2]
        pos = l.find("#")
        A = l[pos+1:].split(",")
        print>>humidity_file, A[0]
        print>>temp2C_file, A[2]
        print>>pressure_file, A[4]
    humidity_file.close()
    temp2C_file.close()
    pressure_file.close()
